#@ backend_layout()
<!-- Main content wrapper -->
#define content()
    <!-- Main content wrapper -->
    <div class="wrapper">
        <div class="statsRow">
            <div class="wrapper">
                <div class="controlB">
                    <ul>
                        <li><a href="/backend/product/add" title=""><img src="/bes/images/icons/control/32/plus.png"
                                                                         alt=""/><span>新增产品</span></a></li>
                    </ul>
                    <div class="clear"></div>
                </div>
            </div>
        </div>
        <!-- Static table -->
        <div class="widget">
            <div class="title"><h6>产品列表</h6>
            </div>
            <table cellpadding="0" cellspacing="0" width="100%" class="sTable mTable">
                <thead>
                <tr>
                    <td width="2%"></td>
                    <td width="15%">产品名称</td>
                    <td width="15%">类型</td>
                    <td width="15%">品牌</td>
                    <td width="15%">标题</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody>
                #for(product:productPage.getList())
                    <tr>
                        <td>#(for.index+1)</td>
                        <td align="center"><a href="/product/detail?id=#(product.id)" target="_blank">#(product.name??)</a></td>
                        <td align="center">
                            #(AttrUtils.getProductAttr(product.type).value)
                        </td>
                        <td align="center">
                            #(AttrUtils.getProductAttr(product.brand).value)
                        </td>
                        <td align="center">#(product.title)</td>
                        <td align="center">
                            <a title="" class="button blueB" style="margin: 5px;"
                               href="/backend/product/edit?id=#(product.id)"><span>修改</span></a>
                            <a title="" class="button blueB" style="margin: 5px;"
                               href="/backend/product/del?id=#(product.id)"><span>删除</span></a>
                            <a title="" class="button blueB" style="margin: 5px;"
                               href="/backend/product_image/?productId=#(product.id)"><span>管理图片</span></a>
                        </td>
                    </tr>
                #end
                </tbody>
            </table>
        </div>
        #@backend_paginate(productPage.pageNumber,productPage.totalPage,"/backend/product/","")
    </div>
</div>
#end